package tangmukeji.com.rxjava2retrofit2;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

import java.util.List;

import tangmukeji.com.rxjava2retrofit2.api.BaseBeanObserver;
import tangmukeji.com.rxjava2retrofit2.api.HttpManager;
import tangmukeji.com.rxjava2retrofit2.base.Subject;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        HttpManager.init(this)
                .getMovie(0, 10, new BaseBeanObserver<List<Subject>>(this) {
                    @Override
                    protected void onHandleSuccess(List<Subject> subjects) {
                        Log.i("TAG", "result:" + subjects.toString());
                    }
                });

    }
}
